//
//  TEWebService.m
//  TintExample
//
//  Created by Kevin Wu on 5/24/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TEWebService.h"

@implementation TEWebService


@synthesize uid = _uid;
@synthesize adult = _adult;
@synthesize weight = _weight;
@synthesize height = _height;
@synthesize name = _name;
@synthesize datetime = _datetime;

- (void)dealloc {
    _uid = 0;
    _adult = NO;
    _weight = 0;
    _height = 0.0;
    TTRelease(_name);
    TTRelease(_datetime);
    [super dealloc];
}


- (id)parseObject:(id)object {
    
    int interval = 3;
    
    for (int i=0; i<interval; ++i) {
        TTDPRINT(@"Parsing ... %d", i+1);
        sleep(1);
    }
    
    static int i=0;
    ++i;
    if (i%2) {
        //return [NSError errorWithDomain:TTTintErrorDomain description:@"Test Error"];
    }
    
    return nil;
}

- (void)saveResult:(id)result {
    
    int interval = 3;
    
    for (int i=0; i<interval; ++i) {
        TTDPRINT(@"Saving ... %d", i+1);
        sleep(1);
    }
    
}


@end
